#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int swzh(int n)
{
    int s = 0;
    while (n != 0)
    {
        s = s + n % 10;
        n = n / 10;
    }
    return s;
}

int main()
{
    int a, b, s = 0;
    scanf("%d %d", &a, &b);
    for (int i = a; i <= b; i++)
    {
        if (swzh(i) % 5 == 0)
            s++;
    }
    printf("%d", s);
    return 0;
}